package com.ftg.learn.service;

import com.ftg.learn.domain.DeptDomain;
import com.ftg.learn.mapper.DeptMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 布衣
 */
@Service

public class DeptService {

    @Resource
    DeptMapper deptMapper;

    public PageInfo<DeptDomain> showAll(Integer pageNum,Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<>(deptMapper.showAll());
    }

}
